package com.hama.zea;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.apache.http.client.HttpClient;

import com.hama.zea.controller.Constants;
import com.hama.zea.controller.HttpRequestTest;

public class T {
	public 	synchronized Object getRecordById(String id) {
		
		return null;
	}
	
	public static void main(String[] args) {
		post_rightaspx();
		post_debitaspx();
		post_refundaspx();
		
		//
	}
	
	/**
	 * post right.aspx 授信
	 */
	public static void post_rightaspx(){
		Map<String,Object> map=new HashMap<String, Object>();
		map.put("merTypeCode", "newhope");//融资机构
		map.put("certID", "421281199210054138");//证件号码
		map.put("PhoneNo", "18513572423");//手机号
		map.put("serialNo", "66666666666666666666");//流水号
		map.put("merId", "7001100");//商户号
		map.put("custNo", "421281199210054138");//客户号
		map.put("certType", "Ind01");//证件类型
		map.put("applyAmt", "100.00");//申领金额
		map.put("appylRes", "00");//申领结果
		String param=HttpRequestTest.retPostParam(map);
		String a = HttpRequestTest.sendPost(Constants.right_, param);
		System.out.println(a);
	}
	
	/**
	 * post debit.aspx 借款
	 */
	public static void post_debitaspx(){
		Map<String,Object> map=new HashMap<String, Object>();
		map.put("merTypeCode", "newhope");//融资机构
		map.put("merchantNo", "7001100");//商户号
		map.put("mfCustomerId", "421281199210054138");//客户号
		map.put("channelFlag", "1");//固定值渠道标识
		map.put("bapplyno", "421281199210054138");//额度编号、
		map.put("busiSum", "100000.00");//放款金额
		map.put("contrSerialNo", "666666");//放款合同编号
		map.put("putoutDate", "2016-05-21 11:03:13");//起始日期
		map.put("maturity", "2016-07-21 11:03:13");//到期日期
		map.put("payBackCardNo", "6227002875060811055");//还款卡号
		map.put("exeYearRate", "0.04");//执行年利率
		String param=HttpRequestTest.retPostParam(map);
		String a = HttpRequestTest.sendPost(Constants.debit_success, param);
		System.out.println(a);
	}
	
	/**
	 * post refund.aspx  还款
	 */
	public static void post_refundaspx(){
		Map<String,Object> map=new HashMap<String, Object>();
		map.put("merTypeCode", "newhope");//融资机构
		map.put("merchantNo", "7001100");//商户号
		map.put("custId", "421281199210054138");//用户号
		map.put("applyno", "421281199210054138");//额度编号
		map.put("loanAmount", "500");//贷款金额
		map.put("loanAccount", "6227002875060811055");//贷款账号
		map.put("payAmount", "500");//还款金额
		map.put("oSPrin", "600");//本金余额
		map.put("currDate", "2016-06-21 11:03:13");//还款日期
		String param=HttpRequestTest.retPostParam(map);
		String a = HttpRequestTest.sendPost(Constants.refund_success, param);
		System.out.println(a);
	}
	
}
class a{
	
}